﻿#ifndef BUSS_ORDER_H
#define BUSS_ORDER_H

#include <QWidget>
#include <QDate>
#include <QTableWidget>、
#include <QPushButton>
#include <QLabel>
namespace Ui {
class Buss_order;
}

class Buss_order : public QWidget
{
    Q_OBJECT

public:
    explicit Buss_order(int bus_id,QWidget *parent = nullptr);
    ~Buss_order();
    void setBusId(int busId){
        this->bus_id = busId;
    }
    void loadOrders(const QString &searchText, const QDate &startDate, const QDate &endDate, bool finishedOnly = false);
private slots:
    void on_pushButton_return_clicked();
    void on_pushButton_timefilter_clicked();
    void on_pushButton_serch_clicked();
    void onAcceptOrderClicked(int orderId, QPushButton *btn);

private:
    Ui::Buss_order *ui;
    int bus_id;
    QTableWidget *orderTable;
    QLabel *totalIncomeLabel = nullptr;
};

#endif // BUSS_ORDER_H
